const Base = require('./base.js');

module.exports = class extends Base {
  async get_listAction() {
    let that = this;
    let { page = 1, size = 20 } = that.post();
    let result = await that.model('t_record', '')
      .field('t_record.id as record_id,t_record.title as title,t_record.status as status')
      .page(page, size).countSelect();
    return that.json({ code: 0, msg: '', data: result });
  }
  async get_issue_detailAction() {

  }
  async get_children_listAction() {
    let that = this;
    let { record_id } = that.post();
    let recordData = await that.model().where({ 't_record.id': record_id }).find();
    let result = await that.model().where({ uuid: recordData.uuid }).select();
    return that.json({ code: 0, msg: '', data: result });
  }
  async edit_issueAction() {
    let that = this;
    let { record_id, title, status } = that.post();
  }
  async change_statusAction() {

  }
  async merge_issueAction() {

  }
  async merge_main_issueAction() {

  }
  async move_issueAction() {

  }
};
